<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>usbpsu: xusb_poll_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">usbpsu
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xusb__poll__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xusb_poll_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file implements the mass storage class poll example. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
1.5   vak  06/02/19 First release
1.5   vak  03/25/19 Fixed incorrect data_alignment pragma directive for IAR
1.8   pm  15/09/20 Fixed C++ Compilation error.
1.14  pm   21/06/23 Added support for system device-tree flow.</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a827731c39d2e383df605eccb5864d469"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xusb__poll__example_8c.html#a827731c39d2e383df605eccb5864d469">BulkOutHandler</a> (void *CallBackRef, u32 RequestedBytes, u32 BytesTxed)</td></tr>
<tr class="memdesc:a827731c39d2e383df605eccb5864d469"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is Bulk Out Endpoint handler/Callback called by driver when data is received.  <a href="#a827731c39d2e383df605eccb5864d469">More...</a><br/></td></tr>
<tr class="separator:a827731c39d2e383df605eccb5864d469"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5427b67da8571837c063db309a460d37"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xusb__poll__example_8c.html#a5427b67da8571837c063db309a460d37">BulkInHandler</a> (void *CallBackRef, u32 RequestedBytes, u32 BytesTxed)</td></tr>
<tr class="memdesc:a5427b67da8571837c063db309a460d37"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is Bulk In Endpoint handler/Callback called by driver when data is sent.  <a href="#a5427b67da8571837c063db309a460d37">More...</a><br/></td></tr>
<tr class="separator:a5427b67da8571837c063db309a460d37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xusb__poll__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the main function of the USB mass storage example.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a5427b67da8571837c063db309a460d37"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void BulkInHandler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>CallBackRef</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>RequestedBytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>BytesTxed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is Bulk In Endpoint handler/Callback called by driver when data is sent. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CallBackRef</td><td>is pointer to <a class="el" href="struct_usb___dev_data.html" title="struct Usb_DevData - Application device data Application Data ">Usb_DevData</a> instance. </td></tr>
    <tr><td class="paramname">RequestedBytes</td><td>is number of bytes requested to send. </td></tr>
    <tr><td class="paramname">BytesTxed</td><td>is actual number of bytes sent to Host.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

</div>
</div>
<a class="anchor" id="a827731c39d2e383df605eccb5864d469"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void BulkOutHandler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>CallBackRef</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>RequestedBytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>BytesTxed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is Bulk Out Endpoint handler/Callback called by driver when data is received. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CallBackRef</td><td>is pointer to <a class="el" href="struct_usb___dev_data.html" title="struct Usb_DevData - Application device data Application Data ">Usb_DevData</a> instance. </td></tr>
    <tr><td class="paramname">RequestedBytes</td><td>is number of bytes requested for reception. </td></tr>
    <tr><td class="paramname">BytesTxed</td><td>is actual number of bytes received from Host.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

</div>
</div>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the main function of the USB mass storage example. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if successful,</li>
<li>XST_FAILURE if unsuccessful.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="struct_x_usb_psu___config.html#a389cb184e06d5795b4239fe005e2290f">XUsbPsu_Config::BaseAddress</a>, <a class="el" href="xusb__intr__example_8c.html#a5427b67da8571837c063db309a460d37">BulkInHandler()</a>, <a class="el" href="xusb__intr__example_8c.html#a827731c39d2e383df605eccb5864d469">BulkOutHandler()</a>, <a class="el" href="xusb__ch9_8c.html#a4a51f5e7948e7a27adcd66023d48876d">Ch9Handler()</a>, <a class="el" href="struct_usb___dev_data.html#a35624c7f1dbe7a05bd61f4abf44d5cd8">Usb_DevData::PrivateData</a>, <a class="el" href="xusbpsu_8h.html#a49b4750a0007cdf47d99b02c39d4ee3f">Status</a>, <a class="el" href="xusb__wrapper_8c.html#af81f75ebda88cd593c5619754286e4ae">UsbEnableEvent()</a>, <a class="el" href="xusb__wrapper_8c.html#a1c387f7a6cc0e39d1adaaff2d1fd1f00">UsbPollHandler()</a>, <a class="el" href="group__usbpsu__api.html#gacff30d70dc978fce3f0bd863c90195fe">XUSBPSU_DEVTEN_CONNECTDONEEN</a>, <a class="el" href="group__usbpsu__api.html#ga1ef571f8495a685e2128d3691afee75e">XUSBPSU_DEVTEN_DISCONNEVTEN</a>, <a class="el" href="group__usbpsu__api.html#gad7b4e70ee47462229a243ba71ab98aa1">XUSBPSU_DEVTEN_EVNTOVERFLOWEN</a>, <a class="el" href="group__usbpsu__api.html#gaf77de6ef99216d8d681032f133438d1d">XUSBPSU_DEVTEN_ULSTCNGEN</a>, <a class="el" href="group__usbpsu__api.html#ga3b1344d907f7ae5c9194f79603a2e12f">XUSBPSU_DEVTEN_USBRSTEN</a>, and <a class="el" href="group__usbpsu__api.html#ga31f8bfbbcc6b7c06a7650c6e5562ad6b">XUSBPSU_DEVTEN_WKUPEVTEN</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
